package com.sl.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.sl.service.Producer;

@RestController
public class JMSCotroller {
	@Autowired
	private  Producer producer;
	@RequestMapping(path="/testQueueAndTopic")
	public String testQueueAndTopic() {
		producer.sendMessage("this is a queue message");
		producer.publish("this is a topic message");
		return "success";
	}
}
